/* Applet_Sub1 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.applet.Applet;
import java.applet.AppletContext;
import java.awt.Container;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.URL;

public abstract class Applet_Sub1 extends Applet implements Runnable,
		FocusListener, WindowListener {
	public static byte aByte1 = 0;
	public static long[] aLongArray2 = new long[200];
	public static Stream aClass39_Sub6_3;
	public static JString aClass3_4 = Class39_Sub5_Sub9.createJString(119, "m");
	public boolean aBoolean5 = false;
	public static JString aClass3_6;
	public static JString aClass3_7;
	public static int anInt8;
	public static JString aClass3_9;
	public static JString aClass3_10;
	public static int anInt11;
	public static boolean aBoolean12;

	public void windowClosing(WindowEvent windowevent) {
		destroy();
	}

	public void start() {
		if (this == Login.anApplet_Sub1_465 && !Class62.aBoolean1112)
			Class15.aLong281 = 0L;
	}

	public String getParameter(String string) {
		if (Class10.aFrame163 != null)
			return null;
		if (Class39_Sub5_Sub9.aClass21_1802 != null && Class39_Sub5_Sub9.aClass21_1802.anApplet416 != this)
			return Class39_Sub5_Sub9.aClass21_1802.anApplet416.getParameter(string);
		return super.getParameter(string);
	}

	public void focusGained(FocusEvent focusevent) {
		Class45.aBoolean861 = true;
		Class39_Sub5_Sub2.aBoolean1690 = true;
	}

	public void run() {
		try {
			if (Signlink.aString401 != null) {
				String string = Signlink.aString401.toLowerCase();
				if (string.indexOf("sun") == -1 && string.indexOf("apple") == -1) {
					if (string.indexOf("ibm") != -1 && (Signlink.aString407 == null || Signlink.aString407.equals("1.4.2"))) {
						method19((byte) 25, "wrongjava");
						return;
					}
				} else {
					String string_0_ = Signlink.aString407;
					if (string_0_.equals("1.1") || string_0_.startsWith("1.1.") || string_0_.equals("1.2") || string_0_.startsWith("1.2.")) {
						method19((byte) 25, "wrongjava");
						return;
					}
					Class39_Sub5_Sub6.anInt1773 = 5;
				}
			}
			if (Class39_Sub5_Sub9.aClass21_1802.anApplet416 != null) {
				Method method = Signlink.aMethod417;
				if (method != null) {
					try {
						method.invoke((Class39_Sub5_Sub9.aClass21_1802.anApplet416), new Object[] { Boolean.TRUE });
					} catch (Throwable throwable) {
						/* empty */
					}
				}
			}
			method28(54);
			Class34.aClass57_610 = Queue.method994(Class41.aCanvas778, ISAAC.anInt1087, Deque.anInt919, (byte) -120);
			method20(false);
			OnDemandFetcher.aClass46_1206 = Class57.method1009((byte) 89);
			OnDemandFetcher.aClass46_1206.method938((byte) -50);
			while (Class15.aLong281 == 0L || Class2.method51(111) < Class15.aLong281) {
				Class2.anInt50 = OnDemandFetcher.aClass46_1206.method939(4, (Class39_Sub5_Sub6.anInt1773), Class15.anInt276);
				for (int i = 0; Class2.anInt50 > i; i++)
					method16(-1);
				method30((byte) 90);
			}
		} catch (Exception exception) {
			Class39_Sub7.method849(exception, 64, null);
			method19((byte) 25, "crash");
		}
		method27((byte) 77);
	}

	public void windowDeiconified(WindowEvent windowevent) {
		/* empty */
	}

	public void method16(int i) {
		long l = Class2.method51(i ^ ~0x7a);
		long l_1_ = Class67.aLongArray1172[Class39_Sub5_Sub7.anInt1781];
		if (l_1_ != 0L && l_1_ < l) {
			/* empty */
		}
		Class67.aLongArray1172[Class39_Sub5_Sub7.anInt1781] = l;
		Class39_Sub5_Sub7.anInt1781 = Class39_Sub5_Sub7.anInt1781 - i & 0x1f;
		synchronized (this) {
			Class43.aBoolean802 = Class45.aBoolean861;
		}
		method33((byte) 19);
	}

	public void method17(int i, int i_2_, int i_3_, int i_4_, int i_5_) {
		try {
			if (Login.anApplet_Sub1_465 != null) {
				Class62_Sub1.anInt1595++;
				if (Class62_Sub1.anInt1595 >= 3)
					method19((byte) 25, "alreadyloaded");
				else
					getAppletContext().showDocument(getDocumentBase());
			} else {
				OnDemandFetcher.anInt1198 = i_4_;
				Deque.anInt919 = i_2_;
				ISAAC.anInt1087 = i_5_;
				Login.anApplet_Sub1_465 = this;
				if (Class39_Sub5_Sub9.aClass21_1802 == null)
					Class7.aClass21_108 = Class39_Sub5_Sub9.aClass21_1802 = new Signlink(false, this, InetAddress.getByName(getCodeBase().getHost()), i_3_, null, 0);
				Class39_Sub5_Sub9.aClass21_1802.method252(-113, this, 1);
			}
		} catch (Exception exception) {
			Class39_Sub7.method849(exception, 64, null);
			method19((byte) 25, "crash");
		}
	}

	public void windowIconified(WindowEvent windowevent) {
		/* empty */
	}

	public static void method18(Signlink class21) {
		Class7.aClass21_108 = Class39_Sub5_Sub9.aClass21_1802 = class21;
	}

	public void method19(byte i, String string) {
		if (!aBoolean5) {
			aBoolean5 = true;
			System.out.println("error_game_" + string);
			try {
				getAppletContext().showDocument(new URL(getCodeBase(), ("error_game_" + string + ".ws")));
			} catch (Exception exception) {
				/* empty */
			}
		}
	}

	public abstract void method20(boolean bool);

	public AppletContext getAppletContext() {
		if (Class10.aFrame163 != null)
			return null;
		if (Class39_Sub5_Sub9.aClass21_1802 != null && Class39_Sub5_Sub9.aClass21_1802.anApplet416 != this)
			return Class39_Sub5_Sub9.aClass21_1802.anApplet416.getAppletContext();
		return super.getAppletContext();
	}

	public static void method21(byte i) {
		aClass39_Sub6_3 = null;
		aLongArray2 = null;
		aClass3_4 = null;
		aClass3_7 = null;
		aClass3_9 = null;
		aClass3_10 = null;
		aClass3_6 = null;
	}

	public abstract void method22(int i);

	public void method23(int i, InetAddress inetaddress, String string, int i_6_, int i_7_, int i_8_, int i_9_, int i_10_) {
		try {
			Login.anApplet_Sub1_465 = this;
			OnDemandFetcher.anInt1198 = i;
			Deque.anInt919 = i_7_;
			ISAAC.anInt1087 = i_6_;
			Class10.aFrame163 = new Frame();
			Class10.aFrame163.setTitle("Jagex");
			Class10.aFrame163.setResizable(false);
			Class10.aFrame163.addWindowListener(this);
			Class10.aFrame163.setVisible(true);
			Class10.aFrame163.toFront();
			Insets insets = Class10.aFrame163.getInsets();
			Class10.aFrame163.setSize(insets.right + (insets.left + i_6_), insets.top + i_7_ + insets.bottom);
			Class7.aClass21_108 = Class39_Sub5_Sub9.aClass21_1802 = new Signlink(true, null, inetaddress, i_10_, string, i_8_);
			Class39_Sub5_Sub9.aClass21_1802.method252(-71, this, 1);
		} catch (Exception exception) {
			Class39_Sub7.method849(exception, 64, null);
		}
	}

	public URL getCodeBase() {
		if (Class10.aFrame163 != null)
			return null;
		if (Class39_Sub5_Sub9.aClass21_1802 != null && this != Class39_Sub5_Sub9.aClass21_1802.anApplet416)
			return Class39_Sub5_Sub9.aClass21_1802.anApplet416.getCodeBase();
		return super.getCodeBase();
	}

	public static void method24(int i, int i_11_, byte i_12_, int i_13_, Class39_Sub5_Sub13 class39_sub5_sub13) {
		if (Class39_Sub5_Sub11.anInt1841 < 400) {
			if (class39_sub5_sub13.anIntArray1878 != null)
				class39_sub5_sub13 = class39_sub5_sub13.method721(5585);
			if (class39_sub5_sub13 != null && class39_sub5_sub13.aBoolean1886) {
				JString class3 = class39_sub5_sub13.aClass3_1881;
				if (class39_sub5_sub13.anInt1859 != 0)
					class3 = (Class39_Sub5_Sub11.method708((new JString[] { class3, (Class39_Sub5_Sub6.method579((Class7.aClass39_Sub5_Sub4_Sub4_Sub2_109.anInt2506), class39_sub5_sub13.anInt1859, false)), Class39_Sub5_Sub18.aClass3_2118, client.aClass3_1270, Class57.method1007((byte) 71, (class39_sub5_sub13.anInt1859)), Queue.aClass3_984 }), 14569));
				if (Class13.anInt208 != 1) {
					if (ISAAC.aBoolean1100) {
						if ((Class41.anInt776 & 0x2) == 2)
							JString.method55(i, client.aClass3_1273, i_13_, (Class39_Sub5_Sub11.method708((new JString[] { Class14.aClass3_216, (Class39_Sub5_Sub9.aClass3_1817), class3 }), 14569)), (byte) -116, i_11_, 48);
					} else {
						JString[] class3s = class39_sub5_sub13.aClass3Array1866;
						if (Class45.aBoolean862)
							class3s = Class18.method225((byte) 127, class3s);
						if (class3s != null) {
							for (int i_14_ = 4; i_14_ >= 0; i_14_--) {
								if (class3s[i_14_] != null && !class3s[i_14_].equalsIgnoreCase(aClass3_7)) {
									int i_15_ = 0;
									if (i_14_ == 0)
										i_15_ = 42;
									if (i_14_ == 1)
										i_15_ = 17;
									if (i_14_ == 2)
										i_15_ = 13;
									if (i_14_ == 3)
										i_15_ = 53;
									if (i_14_ == 4)
										i_15_ = 46;
									JString.method55(i, class3s[i_14_], i_13_, (Class39_Sub5_Sub11.method708((new JString[] { Class19.aClass3_368, class3 }), 14569)), (byte) -73, i_11_, i_15_);
								}
							}
						}
						if (class3s != null) {
							for (int i_16_ = 4; i_16_ >= 0; i_16_--) {
								if (class3s[i_16_] != null && class3s[i_16_].equalsIgnoreCase(aClass3_7)) {
									int i_17_ = 0;
									int i_18_ = 0;
									if ((Class7.aClass39_Sub5_Sub4_Sub4_Sub2_109.anInt2506) < class39_sub5_sub13.anInt1859)
										i_18_ = 2000;
									if (i_16_ == 0)
										i_17_ = i_18_ + 42;
									if (i_16_ == 1)
										i_17_ = i_18_ + 17;
									if (i_16_ == 2)
										i_17_ = i_18_ + 13;
									if (i_16_ == 3)
										i_17_ = 53 + i_18_;
									if (i_16_ == 4)
										i_17_ = i_18_ + 46;
									JString.method55(i, class3s[i_16_], i_13_, (Class39_Sub5_Sub11.method708((new JString[] { Class19.aClass3_368, class3 }), 14569)), (byte) -127, i_11_, i_17_);
								}
							}
						}
						JString.method55(i, RuntimeException_Sub1.aClass3_1224, i_13_, (Class39_Sub5_Sub11.method708(new JString[] { Class19.aClass3_368, class3 }, 14569)), (byte) -15, i_11_, 1001);
					}
				} else
					JString.method55(i, GameCharacter.aClass3_2310, i_13_, (Class39_Sub5_Sub11.method708((new JString[] { Class39_Sub10.aClass3_1436, Class39_Sub5_Sub9.aClass3_1817, class3 }), 14569)), (byte) -64, i_11_, 47);
			}
		}
	}

	public static void handlePlayerUpdateMask(Player class39_sub5_sub4_sub4_sub2, byte i, int i_19_, int i_20_) {
		if ((i_20_ & 0x40) != 0) {
			int i_21_ = Class39_Sub5_Sub11.inputStream.readByteA((byte) 48);
			byte[] is = new byte[i_21_];
			Stream class39_sub6 = new Stream(is);
			Class39_Sub5_Sub11.inputStream.readBytesA(is, i_21_, 0);
			ISAAC.aClass39_Sub6Array1104[i_19_] = class39_sub6;
			class39_sub5_sub4_sub4_sub2.updateAppearance((byte) -66, class39_sub6);
		}
		if ((i_20_ & 0x100) != 0) {
			class39_sub5_sub4_sub4_sub2.anInt2287 = Class39_Sub5_Sub11.inputStream.readByteS();
			class39_sub5_sub4_sub4_sub2.anInt2266 = Class39_Sub5_Sub11.inputStream.readByteC((byte) 109);
			class39_sub5_sub4_sub4_sub2.anInt2279 = Class39_Sub5_Sub11.inputStream.readByteS();
			class39_sub5_sub4_sub4_sub2.anInt2277 = Class39_Sub5_Sub11.inputStream.readByteS();
			class39_sub5_sub4_sub4_sub2.anInt2256 = Class39_Sub5_Sub11.inputStream.readShortLEA((byte) 127) + Class2.anInt48;
			class39_sub5_sub4_sub4_sub2.anInt2261 = Class39_Sub5_Sub11.inputStream.readShortLEA((byte) 125) + Class2.anInt48;
			class39_sub5_sub4_sub4_sub2.anInt2292 = Class39_Sub5_Sub11.inputStream.readByteC((byte) -122);
			class39_sub5_sub4_sub4_sub2.method515(0);
		}
		if ((i_20_ & 0x200) != 0) {
			class39_sub5_sub4_sub4_sub2.anInt2270 = Class39_Sub5_Sub11.inputStream.readShort(110);
			int i_22_ = Class39_Sub5_Sub11.inputStream.readInt2();
			class39_sub5_sub4_sub4_sub2.anInt2272 = (i_22_ & 0xffff) + Class2.anInt48;
			if (class39_sub5_sub4_sub4_sub2.anInt2270 == 65535)
				class39_sub5_sub4_sub4_sub2.anInt2270 = -1;
			class39_sub5_sub4_sub4_sub2.anInt2304 = 0;
			class39_sub5_sub4_sub4_sub2.anInt2276 = 0;
			class39_sub5_sub4_sub4_sub2.anInt2288 = i_22_ >> 16;
			if (Class2.anInt48 < class39_sub5_sub4_sub4_sub2.anInt2272)
				class39_sub5_sub4_sub4_sub2.anInt2276 = -1;
		}
		if ((i_20_ & 0x1) != 0) {
			class39_sub5_sub4_sub4_sub2.aClass3_2295 = Class39_Sub5_Sub11.inputStream.readString();
			if (class39_sub5_sub4_sub4_sub2.aClass3_2295.charAt(0) != 126) {
				if (class39_sub5_sub4_sub4_sub2 == Class7.aClass39_Sub5_Sub4_Sub4_Sub2_109)
					Class42.pushMessage(class39_sub5_sub4_sub4_sub2.aClass3_2521, class39_sub5_sub4_sub4_sub2.aClass3_2295, false, 2);
			} else {
				class39_sub5_sub4_sub4_sub2.aClass3_2295 = class39_sub5_sub4_sub4_sub2.aClass3_2295.substring(1);
				Class42.pushMessage(class39_sub5_sub4_sub4_sub2.aClass3_2521, class39_sub5_sub4_sub4_sub2.aClass3_2295, false, 2);
			}
			class39_sub5_sub4_sub4_sub2.anInt2271 = 0;
			class39_sub5_sub4_sub4_sub2.anInt2259 = 150;
			class39_sub5_sub4_sub4_sub2.anInt2296 = 0;
		}
		if ((i_20_ & 0x10) != 0) {
			class39_sub5_sub4_sub4_sub2.anInt2260 = Class39_Sub5_Sub11.inputStream.readShortLEA((byte) 119);
			if (class39_sub5_sub4_sub4_sub2.anInt2260 == 65535)
				class39_sub5_sub4_sub4_sub2.anInt2260 = -1;
		}
		if ((i_20_ & 0x2) != 0) {
			class39_sub5_sub4_sub4_sub2.anInt2316 = Class39_Sub5_Sub11.inputStream.readShortLEA((byte) 126);
			class39_sub5_sub4_sub4_sub2.anInt2300 = Class39_Sub5_Sub11.inputStream.readShortLE(10670);
		}
		if ((i_20_ & 0x8) != 0) {
			int i_23_ = Class39_Sub5_Sub11.inputStream.readShortLEA((byte) 121);
			int i_24_ = Class39_Sub5_Sub11.inputStream.readByteC((byte) -10);
			if (i_23_ == 65535)
				i_23_ = -1;
			Class46_Sub1.method944(class39_sub5_sub4_sub4_sub2, i_23_, -8, i_24_);
		}
		if ((i_20_ & 0x4) != 0) {
			int i_25_ = Class39_Sub5_Sub11.inputStream.readShort(124);
			int i_26_ = Class39_Sub5_Sub11.inputStream.readByte((byte) -8);
			int i_27_ = Class39_Sub5_Sub11.inputStream.readByteA((byte) -117);
			int i_28_ = Class39_Sub5_Sub11.inputStream.currentOffset;
			if (class39_sub5_sub4_sub4_sub2.aClass3_2521 != null && class39_sub5_sub4_sub4_sub2.aClass45_2516 != null) {
				long l = class39_sub5_sub4_sub4_sub2.aClass3_2521.toInt64();
				boolean bool = false;
				if (i_26_ <= 1) {
					for (int i_29_ = 0; Class15.anInt282 > i_29_; i_29_++) {
						if (Class39_Sub5_Sub9.aLongArray1808[i_29_] == l) {
							bool = true;
							break;
						}
					}
				}
				if (!bool && Class36.anInt630 == 0) {
					Player.aClass39_Sub6_2515.currentOffset = 0;
					Class39_Sub5_Sub11.inputStream.readBytesReversed(i_27_, (Player.aClass39_Sub6_2515.buffer), 0);
					Player.aClass39_Sub6_2515.currentOffset = 0;
					JString class3 = Class63.method1090(32767, Player.aClass39_Sub6_2515).formatCapitalization(true);
					class39_sub5_sub4_sub4_sub2.aClass3_2295 = class3.trim((byte) -45);
					class39_sub5_sub4_sub4_sub2.anInt2259 = 150;
					class39_sub5_sub4_sub4_sub2.anInt2296 = i_25_ >> 8;
					class39_sub5_sub4_sub4_sub2.anInt2271 = i_25_ & 0xff;
					if (i_26_ == 2 || i_26_ == 3)
						Class42.pushMessage((Class39_Sub5_Sub11.method708((new JString[] { Class53.aClass3_959, (class39_sub5_sub4_sub4_sub2.aClass3_2521) }), 14569)), class3, false, 1);
					else if (i_26_ != 1)
						Class42.pushMessage((class39_sub5_sub4_sub4_sub2.aClass3_2521), class3, false, 2);
					else
						Class42.pushMessage((Class39_Sub5_Sub11.method708((new JString[] { Class37.aClass3_661, (class39_sub5_sub4_sub4_sub2.aClass3_2521) }), 14569)), class3, false, 1);
				}
			}
			Class39_Sub5_Sub11.inputStream.currentOffset = i_28_ + i_27_;
		}
		if ((i_20_ & 0x400) != 0) {
			int i_30_ = Class39_Sub5_Sub11.inputStream.readByte((byte) -8);
			int i_31_ = Class39_Sub5_Sub11.inputStream.readByteS();
			class39_sub5_sub4_sub4_sub2.method513(-89, Class2.anInt48, i_30_, i_31_);
			class39_sub5_sub4_sub4_sub2.anInt2252 = Class2.anInt48 + 300;
			class39_sub5_sub4_sub4_sub2.anInt2318 = Class39_Sub5_Sub11.inputStream.readByteA((byte) 80);
			class39_sub5_sub4_sub4_sub2.anInt2269 = Class39_Sub5_Sub11.inputStream.readByte((byte) -8);
		}
		if ((i_20_ & 0x20) != 0) {
			int i_32_ = Class39_Sub5_Sub11.inputStream.readByteC((byte) 102);
			int i_33_ = Class39_Sub5_Sub11.inputStream.readByte((byte) -8);
			class39_sub5_sub4_sub4_sub2.method513(-116, Class2.anInt48, i_32_, i_33_);
			class39_sub5_sub4_sub4_sub2.anInt2252 = Class2.anInt48 + 300;
			class39_sub5_sub4_sub4_sub2.anInt2318 = Class39_Sub5_Sub11.inputStream.readByteC((byte) 124);
			class39_sub5_sub4_sub4_sub2.anInt2269 = Class39_Sub5_Sub11.inputStream.readByteC((byte) 105);
		}
	}

	public void update(Graphics graphics) {
		paint(graphics);
	}

	public void windowOpened(WindowEvent windowevent) {
		/* empty */
	}

	public static void method26(int i, int i_34_, int i_35_, int i_36_, int i_37_, int i_38_, int i_39_) {
		int i_40_ = -i_38_ + 2048 & 0x7ff;
		int i_41_ = -i_35_ + 2048 & 0x7ff;
		int i_42_ = 0;
		int i_43_ = 0;
		int i_44_ = i_37_;
		if (i_40_ != 0) {
			int i_45_ = Model.anIntArray2394[i_40_];
			int i_46_ = Model.anIntArray2418[i_40_];
			int i_47_ = i_46_ * i_42_ - i_44_ * i_45_ >> 16;
			i_44_ = i_45_ * i_42_ + i_44_ * i_46_ >> 16;
			i_42_ = i_47_;
		}
		if (i_41_ != 0) {
			int i_48_ = Model.anIntArray2394[i_41_];
			int i_49_ = Model.anIntArray2418[i_41_];
			int i_50_ = i_44_ * i_48_ + i_49_ * i_43_ >> 16;
			i_44_ = -(i_48_ * i_43_) + i_49_ * i_44_ >> 16;
			i_43_ = i_50_;
		}
		Node.anInt742 = -i_44_ + i_36_;
		Class43.anInt799 = i_38_;
		Class39_Sub10.anInt1437 = -i_42_ + i_39_;
		GameCharacter.anInt2315 = i_35_;
		Class39_Sub11.anInt1470 = i_34_ - i_43_;
	}

	public synchronized void method27(byte i) {
		if (i <= 56)
			aByte1 = (byte) -114;
		if (!Class62.aBoolean1112) {
			Class62.aBoolean1112 = true;
			try {
				Class41.aCanvas778.removeFocusListener(this);
			} catch (Exception exception) {
				/* empty */
			}
			try {
				method22(4258);
			} catch (Exception exception) {
				/* empty */
			}
			if (Class10.aFrame163 != null) {
				try {
					System.exit(0);
				} catch (Throwable throwable) {
					/* empty */
				}
			}
			if (Class39_Sub5_Sub9.aClass21_1802 != null) {
				try {
					Class39_Sub5_Sub9.aClass21_1802.method257((byte) 117);
				} catch (Exception exception) {
					/* empty */
				}
			}
			method31(503);
		}
	}

	public synchronized void method28(int i) {
		Container container;
		if (Class10.aFrame163 != null)
			container = Class10.aFrame163;
		else
			container = Class39_Sub5_Sub9.aClass21_1802.anApplet416;
		if (Class41.aCanvas778 != null) {
			Class41.aCanvas778.removeFocusListener(this);
			container.remove(Class41.aCanvas778);
		}
		Class41.aCanvas778 = new Canvas_Sub1(this);
		container.add(Class41.aCanvas778);
		Class41.aCanvas778.setSize(ISAAC.anInt1087, Deque.anInt919);
		Class41.aCanvas778.setVisible(true);
		if (Class10.aFrame163 != null) {
			Insets insets = Class10.aFrame163.getInsets();
			Class41.aCanvas778.setLocation(insets.left, insets.top);
		} else
			Class41.aCanvas778.setLocation(0, 0);
		Class41.aCanvas778.addFocusListener(this);
		Class41.aCanvas778.requestFocus();
		Class39_Sub5_Sub2.aBoolean1690 = true;
		Class39_Sub7.aBoolean1373 = false;
		Class41.aLong782 = Class2.method51(119);
	}

	public synchronized void paint(Graphics graphics) {
		if (this == Login.anApplet_Sub1_465 && !Class62.aBoolean1112) {
			Class39_Sub5_Sub2.aBoolean1690 = true;
			if (Signlink.aString407 != null && Signlink.aString407.startsWith("1.5") && Class2.method51(85) - Class41.aLong782 > 1000L) {
				Rectangle rectangle = graphics.getClipBounds();
				if (rectangle == null || (ISAAC.anInt1087 <= rectangle.width && Deque.anInt919 <= rectangle.height))
					Class39_Sub7.aBoolean1373 = true;
			}
		}
	}

	public void stop() {
		if (this == Login.anApplet_Sub1_465 && !Class62.aBoolean1112)
			Class15.aLong281 = Class2.method51(41) + 4000L;
	}

	public boolean method29(int i) {
		String string = getDocumentBase().getHost().toLowerCase();
		if (string.endsWith("jagex.com"))
			return true;
		if (string.endsWith("runescape.com"))
			return true;
		if (string.endsWith("127.0.0.1"))
			return true;
		for (/**/; (string.length() > 0 && string.charAt(string.length() - 1) >= '0' && string.charAt(string.length() - 1) <= '9'); string = string.substring(0, string.length() - 1)) {
			/* empty */
		}
		if (string.endsWith("192.168.1."))
			return true;
		method19((byte) 25, "invalidhost");
		return false;
	}

	public void destroy() {
		if (this == Login.anApplet_Sub1_465 && !Class62.aBoolean1112) {
			Class15.aLong281 = Class2.method51(49);
			Class45.method917(3, 5000L);
			Class7.aClass21_108 = null;
			method27((byte) 92);
		}
	}

	public void windowClosed(WindowEvent windowevent) {
		/* empty */
	}

	public void windowDeactivated(WindowEvent windowevent) {
		/* empty */
	}

	public void method30(byte i) {
		if (i < 67)
			method21((byte) 122);
		long l = Class2.method51(127);
		long l_51_ = Class39_Sub7.aLongArray1374[Class42.anInt793];
		Class39_Sub7.aLongArray1374[Class42.anInt793] = l;
		if (l_51_ != 0L && l_51_ < l) {
			int i_52_ = (int) (l + -l_51_);
			Class39_Sub5_Sub18.anInt2119 = (32000 + (i_52_ >> 1)) / i_52_;
		}
		Class42.anInt793 = Class42.anInt793 + 1 & 0x1f;
		if (Class45.anInt855++ > 50) {
			Class45.anInt855 -= 50;
			Class39_Sub5_Sub2.aBoolean1690 = true;
			Class41.aCanvas778.setSize(ISAAC.anInt1087, Deque.anInt919);
			Class41.aCanvas778.setVisible(true);
			if (Class10.aFrame163 == null)
				Class41.aCanvas778.setLocation(0, 0);
			else {
				Insets insets = Class10.aFrame163.getInsets();
				Class41.aCanvas778.setLocation(insets.left, insets.top);
			}
		}
		method32(true);
	}

	public abstract void method31(int i);

	public abstract void init();

	public URL getDocumentBase() {
		if (Class10.aFrame163 != null)
			return null;
		if (Class39_Sub5_Sub9.aClass21_1802 != null && this != Class39_Sub5_Sub9.aClass21_1802.anApplet416)
			return Class39_Sub5_Sub9.aClass21_1802.anApplet416.getDocumentBase();
		return super.getDocumentBase();
	}

	public void focusLost(FocusEvent focusevent) {
		Class45.aBoolean861 = false;
	}

	public void windowActivated(WindowEvent windowevent) {
		/* empty */
	}

	public abstract void method32(boolean bool);

	public abstract void method33(byte i);

	static {
		aClass39_Sub6_3 = new Stream(8);
		aClass3_6 = Class39_Sub5_Sub9.createJString(120, "Loading title screen )2 ");
		aClass3_10 = aClass3_6;
		aClass3_9 = Class39_Sub5_Sub9.createJString(117, "Attack");
		aClass3_7 = aClass3_9;
	}
}
